﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using eBay.Service.Core.Soap;

namespace eBayBus.Block
{
    public class CheckoutBlock
    {
        public static Dictionary<string, string> _CheckoutBlocks = new Dictionary<string, string>();

                public CheckoutBlock()
        {
            Init();
        }

        private static void Init()
        {
            if (_CheckoutBlocks.Keys.Count > 0) return;

            _CheckoutBlocks.Add("BOOODEV@GMAIL.COM", "BOOODEV@GMAIL.COM");
            _CheckoutBlocks.Add("OKKMAN@GMAIL.COM", "OKKMAN@GMAIL.COM");
        }

        public static Dictionary<string, string> GetAll()
        {
            Init();
            return _CheckoutBlocks;
        }

        public static void SetBlock(string key, ItemType i1)
        {

            switch (key)
            {
                case "BOOODEV@GMAIL.COM":

                    #region BOOODEV@GMAIL.COM


                    i1.PaymentMethods = new BuyerPaymentMethodCodeTypeCollection(new BuyerPaymentMethodCodeType[]
                                    {
                                        BuyerPaymentMethodCodeType.PayPal
                                    }
                    );
                    i1.PayPalEmailAddress = "BOOODEV@GMAIL.COM";


                    #endregion

                    break;
                case "OKKMAN@GMAIL.COM":

                    #region OKKMAN@GMAIL.COM


                    i1.PaymentMethods = new BuyerPaymentMethodCodeTypeCollection(new BuyerPaymentMethodCodeType[]
                                    {
                                        BuyerPaymentMethodCodeType.PayPal
                                    }
                    );
                    i1.PayPalEmailAddress = "OKKMAN@GMAIL.COM";


                    #endregion

                    break;

                default:
                    break;
            }

        }
    }
}
